<%-- 
    Document   : oferta
    Created on : 02/11/2011, 09:20:47 PM
    Author     : ari
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <script type="text/javascript">  
        function errorserv() {  
            alert('Ha ocurrido un error con el servidor, se le dirigirá a la página inicial.');  
        }  
  
    </script>    
    <%-- start web service invocation --%>
    <%
    try {
	services.AccionWebService_Service service = new services.AccionWebService_Service();
	services.AccionWebService port = service.getAccionWebServicePort();
	 // TODO initialize WS operation arguments here
	java.lang.Long id = new Long(request.getParameter("id"));
	// TODO process result here
	java.util.List<java.lang.Object> result = port.obtenerInfo(id);
        %>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
                <link rel="stylesheet" href="estilo.css">
            <title>Bolsa de Valores</title>
        </head>
        <body>
            <div class="caja">
        <h1>Oferta</h1><hr/>
        <p style="margin:1em 0em 0em 0em;">Empresa: <%= result.get(0)%></p>
        <p>N° de acciones: <%= result.get(1)%></p>
        <p>Monto: <%= result.get(2)%></p>
        <form action='deleteAccion.jsp' method="post">
            <input type="hidden" name="id" value=<%=id%>>
         <div>
         <input type=button value="Atras" onclick="location.href='main.jsp'">
         <input type="submit" value="Borrar">
         </div>
        </form>
            </div>
        <%
    } catch (Exception ex) {
	%>    
        <head>
            <meta HTTP-EQUIV="REFRESH" content="2; url=index.jsp">
                <title>Bolsa de Valores</title>
            </head>
            <body><hr/>
            <script>
            window.onload=errorserv;
            </script>
                
        <%
        %>
        </body>
        <%
    }
    %>
    <%-- end web service invocation --%><hr/>
    </body>
</html>
